package com.frxuexi.cart.adapter

import androidx.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.cart.R
import com.frxuexi.cart.databinding.ItemCouponBinding
import com.frxuexi.cart.databinding.ItemMycouponBinding
import com.frxuexi.lib_base.entity.CouponBeanItem
import com.frxuexi.lib_base.entity.MyCouponBeanItem

class MyCouponAdapter:BaseQuickAdapter<MyCouponBeanItem,BaseViewHolder>(R.layout.item_mycoupon) {
    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemMycouponBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: MyCouponBeanItem) {
        val binding = DataBindingUtil.getBinding<ItemMycouponBinding>(helper.itemView)!!
        binding.bean=item

    }
}